﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Main.Master" AutoEventWireup="true"
    CodeBehind="list.aspx.cs" Inherits="AdventureWorksWebApp.list" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div id="header">
        <h2>
            Lista produktów</h2>
    </div>
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
        AllowPaging="True" onpageindexchanging="GridView1_PageIndexChanging" 
        PageSize="25" ClientIDMode="Static">
        <Columns>
            <asp:BoundField DataField="productName" HeaderText="Nazwa produktu"/>
            <asp:BoundField DataField="productPrice" HeaderText="Cena" />
            <asp:BoundField DataField="subcategoryName" HeaderText="Podkategoria"  />
            <asp:BoundField DataField="categoryName" HeaderText="Kategoria"  />
            <asp:HyperLinkField DataNavigateUrlFields="productID" 
                DataNavigateUrlFormatString="details.aspx?id={0}" HeaderText="Szczegóły" 
                Text="Szczegóły" />
        </Columns>
    </asp:GridView>
    <asp:Label ID="lblNoRows" runat="server" Text="Nie znaleziono rekordów" Visible="false" CssClass="center"></asp:Label>
    <div id="buttons">
        <asp:LinkButton ID="lnkBack" runat="server" Text="Powrót do menu" PostBackUrl="~/index.aspx" CssClass="button" />
        <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
        <asp:LinkButton ID="lnkSzukaj" runat="server" Text="Szukaj" CssClass="button" 
            onclick="lnkSzukaj_Click" />        
    </div>
</asp:Content>
